Skip to content

fix(reporting): suppress unchanged revisions and require stable close evidence - #1921

Open
rachitm022 wants to merge 1 commit into
mainfrom
rachitm022/unchanged-revisions-finality
Open

rachitm022 wants to merge 1 commit into
mainfrom
rachitm022/unchanged-revisions-finality

Conversation

@rachitm022

Copy link
Copy Markdown
Collaborator

Why

Scheduled reporting rechecks created a revision and notification even when source content was unchanged. ESA's package definition also needs an official close only after the 90-day window and a day of source stability backed by authoritative evidence.

What changed

  • Advance the durable observation and next due time without a revision when the verified content fingerprint matches the current snapshot. Changed reads still supersede the snapshot.
  • Let multiple PostgreSQL observations reference one immutable revision, with account, obligation, and current-leaf checks under the store lock.
  • Add an opt-in stability duration to the provisional offering. Official close requires an authoritative offering, source evidence reference, stable-since timestamp, minimum period age, and a full stability interval at the source read cutoff.
  • Retire premature or unavailable official attempts without publishing, so retries use a fresh source key and cutoff. Keep post-close corrections on the adjustment path.
  • Document the ESA configuration and expected release adoption.

Verification

  • Focused reporting suite: 149 passed, 31 skipped (PostgreSQL cases need a configured test database).
  • Distribution packaging suite: 8 passed, 2 skipped.
  • Scoped mypy, Ruff, format, and diff checks passed.
  • Repo-wide mypy currently reports an unrelated httpcore2._backends.base.SOCKET_OPTION export error in src/adcp/signing/ip_pinned_transport.py.

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Approve

Approve — clean review, no blocking or medium findings.

No no-auto-approve team match; gated_paths is false; high_risk is false. review_decision is REVIEW_REQUIRED, but with gated_paths=false that does not force escalation (row 2 only fires when gated_paths is true). No findings in the reviewer list, so rows 1, 4, 5, 6, and 8 do not apply.

What was checked: unchanged-read suppression and the opt-in official_stability_duration close are internally consistent across both store backends (pg.py and store.py). The retained-predecessor path fires only on fingerprint match (producer.py:2016); a changed read roots its supersede at the retained leaf (producer.py:1789); the revision is None snapshot-predecessor path mirrors across backends (predecessor-equals, finality=='snapshot', account/obligation scope, current-leaf check), so an observation cannot re-point to a superseded or cross-obligation revision. _record_unpublished_official_attempt advances the ordinal for a fresh source_execution_key per retry; missing source finality-evidence fails retryable rather than silently; the dropped UNIQUE constraint migrates via idempotent DROP CONSTRAINT IF EXISTS with schema object count (27→25) reconciled in tests. All public-surface additions are optional fields.

Non-blocking notes: commit_provisional_observation widens revision to ... | None, a contract change for custom-store adopters — acceptable given the subsystem is explicitly qualification-pending. The pg revision=None branch is CI-only (31 pg cases skipped locally).

Falls through to row 9: approve.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant